package com.video.video.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.video.common.core.domain.BaseEntity;

import java.math.BigDecimal;
import java.util.Date;

import com.video.common.annotation.Excel;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

/**
 * 客户对象 d_user
 *
 * @author ruoyi
 * @date 2022-09-27
 */
public class DUser extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    private String id;

    /**
     * 用户登录名
     */
    @Excel(name = "用户登录名")
    private String username;

    /**
     * 用户登录密码
     */
    @Excel(name = "用户登录密码")
    private String password;

    /**
     * 真实姓名
     */
    @Excel(name = "真实姓名")
    private String realname;

    /**
     * 性别 0男 1女 2未知
     */
    @Excel(name = "性别 0男 1女 2未知")
    private String gender;

    /**
     * 头像
     */
    @Excel(name = "头像")
    private String headimg;

    /**
     * 手机号码
     */
    @Excel(name = "手机号码")
    private String mobile;

    /**
     * 电子邮箱
     */
    @Excel(name = "电子邮箱")
    private String email;

    /**
     * 会员等级：1 一般用户2 VIP用户3 SVIP 4 代理 5 合伙人
     */
    @Excel(name = "会员等级：1 一般用户2 VIP用户3 SVIP 4 代理 5 合伙人")
    private String level;

    /**
     * 上级id
     */
    @Excel(name = "父id")
    private String pid;
    /**
     * 上级名称
     **/
    private String pname;

    /**
     * 钱包余额
     */
    @Excel(name = "钱包余额")
    private BigDecimal balance;

    /**
     * 充值所赠送的余额 剩余金额
     */
    @Excel(name = "赠送余额")
    private BigDecimal giveBalance;

    /**
     * 返佣总额
     */
    @Excel(name = "返佣总额")
    private BigDecimal totalAmount;

    /**
     * 返佣余额
     */
    @Excel(name = "返佣余额")
    private BigDecimal commissionBalance;

    /**
     * 邀请码
     */
    @Excel(name = "邀请码")
    private String inviteCode;

    /**
     * 是否享受分佣  Y 是N 否
     */
    @Excel(name = "是否享受分佣")
    private String isCommission;

    /**
     * 用户状态 1启用 2禁用
     */
    @Excel(name = "用户状态 1启用 2禁用")
    private String status;

    /**
     * 设定的日期 会员天数
     */
    private Integer dayNum;

    /**
     * 到期时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date becomeDue;

    public void setId(String id) {
        this.id = id;
    }

    public String getId() {
        return id;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getUsername() {
        return username;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getPassword() {
        return password;
    }

    public void setRealname(String realname) {
        this.realname = realname;
    }

    public String getRealname() {
        return realname;
    }

    public void setGender(String gender) {
        this.gender = gender;
    }

    public String getGender() {
        return gender;
    }

    public void setHeadimg(String headimg) {
        this.headimg = headimg;
    }

    public String getHeadimg() {
        return headimg;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    public String getMobile() {
        return mobile;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getEmail() {
        return email;
    }

    public void setLevel(String level) {
        this.level = level;
    }

    public String getLevel() {
        return level;
    }

    public void setPid(String pid) {
        this.pid = pid;
    }

    public String getPid() {
        return pid;
    }

    public void setBalance(BigDecimal balance) {
        this.balance = balance;
    }

    public BigDecimal getBalance() {
        return balance;
    }

    public void setTotalAmount(BigDecimal totalAmount) {
        this.totalAmount = totalAmount;
    }

    public BigDecimal getTotalAmount() {
        return totalAmount;
    }

    public void setCommissionBalance(BigDecimal commissionBalance) {
        this.commissionBalance = commissionBalance;
    }

    public BigDecimal getCommissionBalance() {
        return commissionBalance;
    }

    public void setInviteCode(String inviteCode) {
        this.inviteCode = inviteCode;
    }

    public String getInviteCode() {
        return inviteCode;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getStatus() {
        return status;
    }

    public String getPname() {
        return pname;
    }

    public void setPname(String pname) {
        this.pname = pname;
    }

    public String getIsCommission() {
        return isCommission;
    }

    public void setIsCommission(String isCommission) {
        this.isCommission = isCommission;
    }

    public BigDecimal getGiveBalance() {
        return giveBalance;
    }

    public void setGiveBalance(BigDecimal giveBalance) {
        this.giveBalance = giveBalance;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("username", getUsername())
                .append("password", getPassword())
                .append("realname", getRealname())
                .append("gender", getGender())
                .append("headimg", getHeadimg())
                .append("mobile", getMobile())
                .append("email", getEmail())
                .append("level", getLevel())
                .append("pid", getPid())
                .append("balance", getBalance())
                .append("giveBalance", getGiveBalance())
                .append("totalAmount", getTotalAmount())
                .append("commissionBalance", getCommissionBalance())
                .append("inviteCode", getInviteCode())
                .append("status", getStatus())
                .append("createBy", getCreateBy())
                .append("createTime", getCreateTime())
                .append("updateBy", getUpdateBy())
                .append("updateTime", getUpdateTime())
                .toString();
    }

    public Integer getDayNum() {
        return dayNum;
    }

    public void setDayNum(Integer dayNum) {
        this.dayNum = dayNum;
    }

    public Date getBecomeDue() {
        return becomeDue;
    }

    public void setBecomeDue(Date becomeDue) {
        this.becomeDue = becomeDue;
    }
}
